home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD-ROM Today (BR) Volume 2 #6
/
CDRTV2N6.iso
/
ancient
/
search
/
ltdata
/
tab.dir
/
00115_Script_PAGE SLIDER
< prev
next >
Wrap
Text File
|
1995-11-24
|
1KB
|
59 lines
on exitFrame
--
go the frame
if rollOver(1) then
doStrip
else
-- put empty into field "feedBack"
set the visible of sprite 4 = 0
end if
--
end
on doStrip
--
GLOBAL gPagePtr
set stripSprite = 1
set pointerSprite = 3
set feedBackSprite = 4
set maxPage = 150
set X = the mouseH + 0.0 -- must add 0.0 for real math
set W = the width of cast "strip"
set origin = the left of sprite stripSprite
set D = X - origin + 0.0
-- testForSkipped W, origin, X
-- D/W is the fractional distance of the mouseH
-- between the left and right edges of the strip sprite
set gPagePtr = integer(D/W * maxPage)
put gPagePtr into field "feedback"
puppetSprite pointerSprite, TRUE
puppetSprite feedBackSprite, TRUE
set the locH of sprite pointerSprite = X
set the locH of sprite feedBackSprite = X - (the width of sprite feedBackSprite/2)
--
-- set the locH of sprite feedBackSprite = the left of sprite pointerSprite
-- set the visible of sprite pointerSprite = 1
set the visible of sprite feedBackSprite = 1
updateStage
--
end
on testForSkipped W, origin, X
--
repeat with i = 1 to W
set D = origin + i - origin
set Z = integer( 100 * D/W )
put W && D && Z
end repeat
--
end